<template>
  <p>{{name}}</p>
</template>

<script>

import { reactive, toRef } from 'vue'

export default {
  name: 'App',
  setup (props, context) {

    const data = reactive({
      name: 'liuxin'
    })

    const name = toRef(data, 'name')

    setTimeout(() => {
      name.value = 'hello'
    }, 2000);

    return {
      name
    }
  }
}
</script>

<style>

</style>
